package com.example.news.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.news.pojo.entity.Article;
import com.example.news.pojo.form.ArticleForm;
import com.example.news.pojo.form.BasePageQuery;
import com.example.news.pojo.vo.ArticleDetailVo;
import com.example.news.pojo.vo.ArticleVo;
import com.example.news.utils.result.PageResult;
import com.example.news.utils.result.Result;
import org.springframework.stereotype.Service;

@Service
public interface ArticleService extends IService<Article> {
    Result<String> createArticle(ArticleForm request,String token);
    Result<String> deleteArticleById(Integer articleId);
    Result<String> modifyArticle(ArticleForm request);
    Result<String> publishArticle(ArticleForm request);
    Result<String> approveArticle(Integer articleId);
    Result<ArticleDetailVo> getArticleById(Integer articleId);
    Result<String> rejectArticle(Integer articleId);
    PageResult<ArticleVo> userGetArticles(BasePageQuery basePageQuery,Integer typeId);
    PageResult<ArticleVo> adminGetArticles(BasePageQuery basePageQuery);
}
